package com.ic.action;

import java.util.List;




import org.apache.struts2.ServletActionContext;

import com.ic.entity.Item;
import com.ic.service.ItemService;
import com.opensymphony.xwork2.ActionSupport;

public class ItemAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private ItemService itemService;
	private List<Item> data;

	public String getItems(){
		ServletActionContext.getResponse().setHeader("Access-Control-Allow-Origin", "*");
		data=itemService.getItems();
		System.out.println(data.get(0).getDesc());
		return "success";
	}


	public List<Item> getData() {
		return data;
	}


	public void setItemService(ItemService itemService) {
		this.itemService = itemService;
	}


	
	
}
